package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.CompanyFormEntity;
import com.fz.us.oa.core.entity.common.FileManage;

import javax.persistence.*;
import java.util.List;

/**
 * 业务实体类 - 任务反馈表
 * ============================================================================
 * 版权所有 2017 。
 *
 * @author XuHeng
 * @version 1.0 2017-02-10 。
 * ============================================================================
 */
@Entity
@Table(name="ec_taskfeedback")
public class TaskFeedback extends BaseFlowEntity {

    private static final long serialVersionUID = -5686526703883826381L;
    /**
     * 任务发起登记表
     */
    private Task task;

    /**
     * 反馈人 == 新建人
     * 反馈日期 == 新建日期
     */

    /**
     * 完成程度 0:部分完成 1:全部完成
     */
    private int completeLevel;

    /**
     * 任务反馈内容
     */
    private String feedbackContent;

    /**
     * 相关附件
     */
    private List<FileManage> file;

    @ManyToOne(fetch = FetchType.LAZY)
    public Task getTask() {
        return task;
    }

    public void setTask(Task task) {
        this.task = task;
    }

    public int getCompleteLevel() {
        return completeLevel;
    }

    public void setCompleteLevel(int completeLevel) {
        this.completeLevel = completeLevel;
    }

    public String getFeedbackContent() {
        return feedbackContent;
    }

    public void setFeedbackContent(String feedbackContent) {
        this.feedbackContent = feedbackContent;
    }

    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "ec_taskfeedback_file", joinColumns = @JoinColumn(name="id"),inverseJoinColumns = @JoinColumn(name="fileId"))
    public List<FileManage> getFile() {
        return file;
    }

    public void setFile(List<FileManage> file) {
        this.file = file;
    }
}
